﻿@using LY.Business.ServiceImpl
@using LY.Entity
@using LY.Entity.Entities
@using LY.Interface
@{
    ViewBag.Title = "确认信息";
    Layout = "~/Views/Shared/_Layout.cshtml";

    U_BankCard bankCard = ViewBag.bankcard;
    int? Id = null;
    var BankName = "";
    var CardName = "";
    var CardNO = "";
    if (bankCard != null)
    {
        Id = bankCard.Id;
        BankName = bankCard.BankName;
        CardName = bankCard.CardName;
        CardNO = bankCard.CardNO;
    }
}


<link href="~/Content/validform.css" rel="stylesheet" />
<script src="~/Scripts/Validform_v5.3.2_min.js"></script>
<script src="~/Scripts/Validform_Datatype.js"></script>

<script type="text/javascript">
    $(function () {
        //验证初始化
        $("form").Validform({
            tiptype: 3
        });


        $("#BankName").change(function () {
            var value = $("#BankName").select().val();
            if (value != '@BankName') {
                $("#CardName").val("");
                $("#CardNO").val("");
                $("#CardNO1").val("");

            } else {
                $("#CardName").val('@CardName');
                $("#CardNO").val('@CardNO');
            }
        });


    });


    function OnSubmit(data) {
        if (data.Status == 1) {
            $.dialog.tips(data.Message, 2, 'tips.gif', function () {
                window.location.href = data.Data;
            });
        } else {
            $.dialog.tips(data.Message);
            return false;
        }
        return false;
    }
</script>

<div class="line10"></div>
@using (Ajax.BeginForm("UpdateProjectStatus", new AjaxOptions() { OnSuccess = "OnSubmit" }))
{
    <input type="hidden" id="Id" name="Id" value="@Id"/>
    <div class="container">
        <div class="order-process">
            <ul>
                <li class="active">项目及发起人信息</li>
                <li class="active">回报设置</li>
                <li class="active">确认信息</li>
                <li>完成</li>
            </ul>
        </div>

        <div class="additem">
            <div>
                <dl>
                    <dt>请选择银行：</dt>
                    <dd>
                        @Html.ResourceDropDownList("BankName", "BankCard", @BankName, new { @class = "wh160 select" })
                    </dd>
                </dl>
                <dl>
                    <dt>收款人姓名：</dt>
                    <dd>
                        <input type="text" class="input normal" id="CardName" name="CardName" datatype = "*" value="@CardName" />
                    </dd>
                </dl>
                <dl>
                    <dt>银行卡号：</dt>
                    <dd>
                        @Html.TextBox("CardNO", CardNO, new { @class = "input normal", datatype = "BankId", nullmsg = "请输入银行卡号", errormsg = "请输入正确的银行卡号", sucmsg = " " })

                    </dd>
                </dl>
                <dl>
                    <dt>确认银行卡号：</dt>
                    <dd>
                        @Html.TextBox("CardNO1", null, new { @class = "input normal", datatype = "BankId", recheck = "CardNO", nullmsg = "请再输入银行卡号", errormsg = "两次输入的银行卡号不一致", sucmsg = " " })

                    </dd>
                </dl>
            </div>
            <div class="line30"></div>
            <div class="btn-list">
                <div>
                    <a id="before" href="../Project/AddProjectItem?proid=@ViewBag.Proid" class="button">上一步</a>
                    <input type="hidden" id="ProjectId" name="ProjectId" value="@ViewBag.Proid "/>
                    @Html.Hidden("MemberId", null, new { value = ViewBag.memberId })
                    <input type="submit" class="button" id="btnSave" name="btnSave" value="保存草稿" onkeydown="if(event.keyCode==13) return false;" />
                    <input type="submit" class="button" id="next" name="btnSave" value="提交" onkeydown="if(event.keyCode==13) return false;" />
                </div>
            </div>
        </div>

    </div>
}
